package cn.tedu.month;

import cn.tedu.jdbc.TestJDBC1;
import cn.tedu.jdbc.User;

import java.util.ArrayList;
import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        TestJDBC1 testJDBC1 = new TestJDBC1();
        System.out.println("请输入账号");
        int next = scanner.nextInt();
        System.out.println("请输入姓名");
        String next1 = scanner.next();
        ArrayList<User> select = testJDBC1.select(User.class, "select id,name from t_user where id= ? and name = ?", next, next1);
        if (select.size()>0){
            System.out.println("登陆成功");
        }else {
            System.out.println("保存失败");
        }

    }
}
